package com.example.lottery_system.service.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ActivityPrizeStatusEnum {

    RUNNING(1,"未抽取..."),
    COMPLETED(2,"还未抽取!");
    private final Integer code;
    private final String msg;

    public static ActivityPrizeStatusEnum forName(String name) {
        for (ActivityPrizeStatusEnum activityPrizeStatusEnum: ActivityPrizeStatusEnum.values()) {
            if (activityPrizeStatusEnum.name().equalsIgnoreCase(name)) {
                return activityPrizeStatusEnum;
            }
        }

        return null;
    }
}
